﻿Imports System.Management
Public Class PendingReboot
    Public Shared Function Reboot(ByVal strcomputer As String) As Boolean
        Dim processclass As New ManagementClass("Root\ccm\ClientSDK", "CCM_ClientUtilities", Nothing)
        Dim outparams As ManagementBaseObject = processclass.InvokeMethod("DetermineIfRebootPending", Nothing, Nothing)
        Return outparams.Properties("RebootPending").Value.ToString()
    End Function
End Class
